package neu.edu.vn.appmusic.adapter;

import neu.edu.vn.appmusic.R;
import neu.edu.vn.appmusic.ui.CopyOfFragmentOnline_Refactor;
import neu.edu.vn.appmusic.ui.FragmentOffline;
import neu.edu.vn.appmusic.ui.FragmentOnline;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.Log;

public class MainViewPagerAdapter extends FragmentPagerAdapter {
	public static int NUM_ITEMS = 2;
	

	public MainViewPagerAdapter(FragmentManager fm) {
		super(fm);
		// TODO Auto-generated constructor stub
	}

	@Override
	public Fragment getItem(int position) {
		Log.d("DEBUG", "Change Fragment : " + position);
		switch (position) {
		case 0:
			return new CopyOfFragmentOnline_Refactor();
//			return new FragmentOnline();
		case 1:
			return new FragmentOffline();
		default:
			return new FragmentOnline();
		}
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return NUM_ITEMS;
	}
	
	
	
	
	
	

}
